package qky.api.service;

import qky.common.utils.PageUtils;
import qky.api.entity.TokenEntity;

import java.util.Map;
import java.util.List;

/**
 * 用户Token
 *
 * @author qky
 * @email qky_coding_man@gmail.com
 * @date 2022-01-14 23:16:44
 */
public interface TokenService {

    //===============代码生成区===============//

    PageUtils queryPage(Map<String, Object> params);

    TokenEntity query(String id);

    List<TokenEntity> queryList(Map<String, Object> params);

    Boolean save(TokenEntity entity);

    Boolean saveBatch(List<TokenEntity> list);

    Boolean update(TokenEntity entity);

    Boolean updateBatch(List<TokenEntity> list);

    Boolean delete(List<String> id);

    //===============代码生成区===============//

    TokenEntity createToken(String userId);

    void expireToken(String userId);

    TokenEntity queryByToken(String token);
}

